"use strict";
const emps = [
    { id: 1, name: "xiaowang", dept: "开发" },
    { id: 1, name: "xiaowang", dept: "开发" },
    { id: 1, name: "xiaowang", dept: "开发" }
];
function findEmpByName(name) {
    const emp = emps.find(item => item.name == name);
    console.log(emp.id);
    console.log(emp.id);
    // console.log(emp?.id);
    // if(emp){
    //     console.log(emp.id);
    // }
}
